package com.itheima.set;

import com.itheima.domain.Student;

import java.util.TreeSet;

public class Test03 {

    public static void main(String[] args) {
        TreeSet<Student> set = new TreeSet<>();
        Student lu = new Student("鹿晗", 28);
        Student guan = new Student("关晓彤", 28);
        Student wu = new Student("吴亦凡", 29);
        Student cai = new Student("蔡徐坤", 26);
        set.add(lu);
        set.add(guan);
        set.add(wu);
        set.add(cai);

        for (Student student : set) {

            System.out.println(student);
        }

    }
}
